﻿@using ChampionsLeagueBets.Domain
@using MvcContrib
@using MvcContrib.UI.Grid
@model IList<Game>

@Html.Grid(Model).RowAttributes(data => new Hash(@class => data.IsAlternate ? "row-normal" : "row-grayed")).Columns(column =>
{
	column.For(cust => cust.TeamHost);
	column.For(cust => cust.TeamGuest);
	column.For(cust => cust.GameDate).Format("{0:dd-MM-yy}");
	column.For(cust => cust.ResultTeamHost);
	column.For(cust => cust.ResultTeamGuest);
	column.For(cust => Html.ActionLink<GamesController>(c => c.Result(cust.Id, 0, 0), "Ustaw", new { @class = "setResultLink" })).Named("Wynik");
	column.For(cust => Html.ActionLink<GamesController>(c => c.Delete(cust.Id), "Usuń", new { @class = "deleteLink" })).Named("Usuwanie");
}
).Empty("W zadowdach nie zdefiniowano jeszcze meczy")
